.titlebar {
  height: 32px;
  background: linear-gradient(135deg, #0ea5e9 0%, #3b82f6 100%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  position: relative;
  z-index: 100;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.titlebar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 10px;
  flex: 1;
}

.titlebar-icon {
  width: 18px;
  height: 18px;
  color: white;
  flex-shrink: 0;
}

.titlebar-title {
  font-size: 12px;
  font-weight: 600;
  color: white;
  letter-spacing: 0.2px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.titlebar-right {
  display: flex;
  height: 100%;
  position: relative;
  z-index: 101;
}

.titlebar-button {
  width: 44px;
  height: 100%;
  border: none;
  background: transparent;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease;
  padding: 0;
  position: relative;
  z-index: 101;
  outline: none;
}

.titlebar-button:hover {
  background: rgba(255, 255, 255, 0.15);
}

.titlebar-button:active {
  background: rgba(255, 255, 255, 0.25);
}

.titlebar-button-close:hover {
  background: #ef4444;
}

.titlebar-button-close:active {
  background: #dc2626;
}

.titlebar-button svg {
  pointer-events: none;
}

/* 拖拽区域 */
.titlebar {
  -webkit-app-region: drag;
}

/* 按钮区域禁用拖拽 */
.titlebar-button {
  -webkit-app-region: no-drag !important;
}

.titlebar-right {
  -webkit-app-region: no-drag;
}
